package com.shujia.flink.source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.ArrayList;

public class Demo02ListSource {
    public static void main(String[] args) throws Exception {

        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        ArrayList<String> list = new ArrayList<>();
        list.add("java,java,java");
        list.add("flink,flink");
        list.add("java,scala,java");
        list.add("spark,java");

        // 有界的
        DataStreamSource<String> listDS = env.fromCollection(list);

        listDS.print();


        env.execute();


    }
}
